<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of profil
 *
 * @author zframework
 */
class Profil extends AppModel{

    var $validate = array(

       'email' => array(
            'email' => array(
                'rule' => 'email',
            'message' => 'L\'email doit être valide.'
            ),
             'isUnique' => array(
                'rule' => 'isUnique',
                'message' => 'Cet email existe déjà'
                ),
            'notEmpty' => array(
                'rule' => 'notEmpty',
                'message' => 'Il n\'y a pas d\'email'
                )
        ),
        'sexe' => array(
            'rule' => array('inList', array('0', '1')),
            'message' => 'Entrez soit F, soit M.',
            'required' => true,
        ),
        'date_naissance' => array(
            'rule' => 'date',
            'message' => 'Entrez une date valide au format AA-MM-JJ.',
            'allowEmpty' => false,
            'required' => true,
        ),
        'ville' => array(
            'rule' => array('between', 2, 10),
            'message' => 'Nom de ville non valide!!!',
            'allowEmpty' => false,
            'required' => true

        ),
        'masse' => array(
            'rule' => 'numeric',
            'required' => false

        ),
        'taille' => array(
            'rule' => 'numeric',
            'required' => false
        ),
        'autre' => array(
            'rule' => 'alphaNumeric',
            'required' => false,
        ),
        'extension' => array(
            'rule' => 'alphaNumeric',
            'required' => false,
        )




    );

}
?>
